package org.wangnian.validationdemo.service;

import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
import org.wangnian.validationdemo.model.Book;
import org.wangnian.validationdemo.model.BookList;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

@Service
@Validated
public class BookService {

    public void getBooKById(@NotBlank(message = "书ID不能为空") String bookId){

    }

    public void list2(@Valid @NotNull(message = "参数不能为空") BookList bookList) {

    }

    public void list4(@Valid @NotNull(message = "参数不能为空") List<Book> bookList) {

    }
}
